#ifndef CONNECTION_H
#define CONNECTION_H

#include <string>

class Connection
{
	public:
		bool establish(const std::string hostname, const std::string port, std::string *res = NULL);
		bool sendrecv(const std::string message, std::string *res = NULL);
		bool isOpen();
		void close();
		
	private:
		int sockfd_;
		void recieve(std::string *);
};

#endif /* CONNECTION_H */
